Modinput preserve 'app' context#371
Conversation
|
Hi @lowell80, Also, test cases will be automatically triggered (using github workflow) when changes are pushed. So it would help us to resolve, if any error occurs. |
0ee0295 to
88fcea3
Compare
- Update modularinput XML parsing to capture the 'app' tag for configuration stanza elements. This value is stored in the input dict under '__app' to avoid potential naming collisions with user defined parameters. - Updated unittest
88fcea3 to
0f65cd7
Compare
|
@bparmar-splunk, I've rebased my branch on the develop branch, but some of the test are failing. I suspect this is related to things outside the changes I made. Can you take a look at the test logs and determine if this is an issue with my code? Between action job 182 (incorrect rebase mistake by me) and 183 (rebase on develop) I see the errors:
|
|
Hi @lowell80, |
Add the ability to track the
appnamespace for modular inputs. This information is available in the XML passed in via stdin, but has not been available to modular input code using splunklib. Having access to app allows additional interactions with the REST API to be properly namespaces, for example if you need to lookup a password or other conf entry that lives in the same namespace as the input stanza.Example use case with the updated code:
I picked the name
__appto avoid potential naming conflicts with entries ininputs.conf, but it's a bit arbitrary. I'd be happy to change it if there are strong preferences to the contrary.